package jmind.core.json;

import java.io.Serializable;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import jmind.base.util.ToStringHelper;
import jmind.base.util.bean.MapBeanUtil;

public class Pojo implements Serializable {

    @Override
    public String toString() {
        try {
            return JSON.toJSONString(this, SerializerFeature.DisableCircularReferenceDetect);
        } catch (Exception e) {
            return MapBeanUtil.bean2Map(this).toString();
        }
    }

    public  String toPrettyString(){
        return JSON.toJSONString(this,SerializerFeature.WriteDateUseDateFormat,SerializerFeature.DisableCircularReferenceDetect,SerializerFeature.PrettyFormat);
    }



}
